  <template>
  <div class="box">
    <header class="shopkind">
      <div @click="$router.go(-1)"><van-icon name="arrow-left" size="22px"/></div>
      <div @click="$router.push('/search')" class="search"><van-icon name="search" size="22px"/></div>
      <div slot="title" class="title"><h1>新鲜蔬菜</h1></div>
      <div @click="$router.push('/cart')">
        <img src="@/assets/cailanzi_2.png" alt="">
      </div>
    </header>
    <section>
      <van-tabs v-model="active" title-active-color="#00CC99" color="#00CC99">
        <van-tab title="标签">
          <div class="tuijian">
            <h2>今日推荐</h2>
            <ul>
              <li>
                <img src="" alt="">
                <p>小白菜</p>
                <span style="color: #FF6666">5.9</span>/<span>250g</span>
              </li>
              <li>
                <img src="" alt="">
                <p>小白菜</p>
                <span style="color: #FF6666">5.9</span>/<span>250g</span>

              </li>
              <li>
                <img src="" alt="">
                <p>小白菜</p>
                <span style="color: #FF6666">5.9</span>/<span>250g</span>
              </li>
            </ul>
          </div>
          <div class="shucaiNum">
            <h2>农家蔬菜</h2>
            <span>共<i>20</i>款蔬菜</span>
          </div>
          <Prolist></Prolist>
        </van-tab>
        <van-tab title="标签">内容 2</van-tab>
        <van-tab title="标签">内容 3</van-tab>
        <van-tab title="标签">内容 4</van-tab>
        <van-tab title="标签">内容 5</van-tab>
      </van-tabs>
    </section>
  </div>
</template>

<script>
import Vue from 'vue'
import Prolist from '@/components/prolist'
import { Tab, Tabs, NavBar, Icon } from 'vant'
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(NavBar)
Vue.use(Icon)
export default {
  data () {
    return {
      active: 0,
      shopkindlist: []
    }
  },
  components: {
    Prolist
  },
  mounted () {
    console.log(this.$route.params)
  }
}
</script>

<style lang="scss" scoped>
header{
  background-color: #fff;
  display: flex;
  padding: 10px;
  .search{
    line-height: 30px;
    margin-left: 5px;
  }
  .title{
    margin: 0 auto;
    font-size: 17px;
      letter-spacing:2px;
  }
}
section{
  .tuijian{
    margin-top: 10px;
    background-color: #fff;
    width: 100%;
    height: auto;
    h2{
      text-align: center;
      line-height: 45px;
      font-size: 15.5px;
      color: #00CC99;
    }
    ul{
      width: 100%;
      display: flex;
      justify-content: space-evenly;
      border-top: #00CC99 1px solid;
      li{
          font-size: 12.5px;
        text-align: center;
        height: 120px;
        width: 108px;
        color: #9999;
        margin-top: 10px;
        img{
          display: block;
          width: 108px;
          height: 70px;
          border: 1px solid #ccc;
        }
        p{
          margin-top: 5px;
          color: #666666;
        }
        span{
          font-size: 14px;
        }
      }
    }
  }
  .shucaiNum{
    background-color: #fff;
    width: 100%;
    height: 40px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #F2F2F2;
    h2{
      font-size: 15.5px;
      color:#00CC99;
    }
    span{
      font-size: 11.5px;
      color: rgba($color: #666666, $alpha: 0.5);
      line-height: 24px;
    }
  }
}
</style>
